class Restaurant:
    """这是一个表示餐厅的类"""

    def __init__(self, restaurant_name, cuisine_type):
        self.restaurant_name = restaurant_name
        self.cuisine_type = cuisine_type
        self.number_served = 0

    def describe_restaurant(self):
        print(f"The restaurant is {self.restaurant_name}, and the cuisine type is {self.cuisine_type}")

    def open_restaurant(self):
        print(f"{self.restaurant_name} open!")

    def show_number_served(self):
        """打印这家餐厅已经服务的人数"""
        print(f"{self.restaurant_name} had served number : {self.number_served}")

    def set_number_served(self, number_served):
        """设置餐厅的服务人数"""
        self.number_served = number_served

    def increment_number_served(self, number_served=1):
        """递增就餐人数"""
        self.number_served += number_served


if __name__ == '__main__':
    restaurant = Restaurant("三及第餐厅", "中餐")
    restaurant.describe_restaurant()
    restaurant.open_restaurant()

    restaurant.show_number_served()
    restaurant.number_served = 100
    restaurant.show_number_served()

    restaurant.set_number_served(200)
    restaurant.show_number_served()

    # 设置餐厅的递增人数
    restaurant.increment_number_served()
    restaurant.show_number_served()

    restaurant.increment_number_served(20)
    restaurant.show_number_served()
